<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>Inserir Artista</title>
    </h:head>     
    <h:body>   
       <ui:include src="../menu.xhtml" />
        <div id="corpo"> 
        
           <f:view>
                <h:form>
                    <fieldset>
                        <legend>Inserir evento</legend>
                        <table>
                            <tr>
                                <td>Descrição:</td>
                                <td><h:inputText size="76" value="#{eventoBean.evento.descricao}"></h:inputText></td>
                            </tr>
                            <tr>
                            	<td>Data/Hora:</td>                            	
                            	<td><h:inputText size="10" value="#{eventoBean.evento.dataHoraDoEvento}"></h:inputText></td>                            	
                            </tr>
                            <tr>
                            	<td>Produtora:</td>
                            	<td>
                            		<h:selectOneListbox value="#{eventoBean.produtoraSelecionada}">											
	                            		 <f:selectItems  value="#{eventoBean.listaProdutora}" var="prod" 
                                                                 itemLabel="#{prod.nome}" itemValue="#{prod.codigoProdutora}"/>		                            		 
	                            	</h:selectOneListbox>
								</td>   
							</tr>
								
							<tr>
								<td>Artistas</td>
								<td>
									<h:selectManyMenu value="#{eventoBean.artistasSelecionados}" MULTIPLE="true">											
	                            		 <f:selectItems  value="#{eventoBean.listaArtista}" var="art" 
	                            		     itemLabel="#{art.nome}" itemValue="#{art.codigo}"/>		                            		 
	                            	</h:selectManyMenu>(Segure Crtl para selecionar vários)
	                            	
								</td>
							</tr>	                        	
                            <tr>
                            	<td>Local</td>
                            	<td>
									<h:selectOneListbox value="#{eventoBean.localSelecionado}">											
	                            		 <f:selectItems  value="#{eventoBean.listaLocal}" var="loc" 
	                            		     itemLabel="#{loc.descricao}" itemValue="#{loc.codigo}"/>		                            		 
	                            	</h:selectOneListbox>
								</td>
                            </tr>
                            <tr>
                                
                            </tr>
                            <tr>
                                <td>
                                    <h:commandButton value="Inserir" action="#{eventoBean.inserir}"></h:commandButton>
                                </td>
                            </tr>
                        </table>
                        <h:outputText escape="false" value="#{eventoBean.retornoHtml}" />
                    </fieldset>
                </h:form>
                <ui:include src="../rodape.xhtml" />
            </f:view>
             
        </div>
       
    </h:body>
</html>